#include<stdio.h>
int KeyCompression[48] =
  {
  13, 16, 10, 23,  0,  4,  2, 27,
  14,  5, 20,  9, 22, 18, 11,  3,
  25,  7, 15,  6, 26, 19, 12,  1,
  40, 51, 30, 36, 46, 54, 29, 39,
  50, 44, 32, 47, 43, 48, 38, 55,
  33, 52, 45, 41, 49, 35, 28, 31
  };
int InverseKeyCompression[56]=
{
4, 23, 6, 15, 5, 9, 19, 17, 
-1, 11, 2, 14, 22, 0, 8, 18, 
1, -1, 13, 21, 10, -1, 12, 3, 
-1, 16, 20, 7, 46, 30, 26, 47, 
34, 40, -1, 45, 27, -1, 38, 31, 
24, 43, -1, 36, 33, 42, 28, 35, 
37, 44, 32, 25, 41, -1, 29, 39
};
int KeyPermuteMap[56] = 
  {
  49, 42, 35, 28, 21, 14,  7,  0,
  50, 43, 36, 29, 22, 15,  8,  1,
  51, 44, 37, 30, 23, 16,  9,  2,
  52, 45, 38, 31, 55, 48, 41, 34,
  27, 20, 13,  6, 54, 47, 40, 33,
  26, 19, 12,  5, 53, 46, 39, 32,
  25, 18, 11,  4, 24, 17, 10,  3,
  };
int InverseKeyPermuteMap[56] = 
{
7, 15, 23, 55, 51, 43, 35, 6, 
14, 22, 54, 50, 42, 34, 5, 13, 
21, 53, 49, 41, 33, 4, 12, 20, 
52, 48, 40, 32, 3, 11, 19, 27, 
47, 39, 31, 2, 10, 18, 26, 46, 
38, 30, 1, 9, 17, 25, 45, 37, 
29, 0, 8, 16, 24, 44, 36, 28
};
void main()
{
	int array1[56];
	
	int i,ctr;
	for (i=0;i<56;i++)
	{
		array1[KeyPermuteMap[i]]=i;
	}	
	ctr=0;
	for(i=0;i<56;i++)
	{
		ctr++;
		printf("%d, ",array1[i]);
		if (ctr==8)
		{
			ctr=0;
			printf("\n");
		}
		
	}
	printf("\n");
}
